import Vue from 'vue';
import changeClinic from './changeClinic';


export default {
  init() {
    if (!this.instance) {
      let changeClinicInstance = Vue.extend(changeClinic);
      this.instance = new changeClinicInstance().$mount();
      document.body.appendChild(this.instance.$el);
    }
  },
  show(opt) {
    this.instance.show(opt)
  },
  close() {
    this.instance.close();
  },
  install(Vue) {
    this.init();
    Vue.prototype.$changeClinic = this;
  }
}